package com.pengzy.comment.core.enums;

import lombok.Getter;

/**
 * @author xiaozhi 2023/7/12
 */

public enum SecurityEnum {

    LOGIN_KEY(1,"login:"),
    REGISTER(1,"login:"),
    ;
    @Getter
    private int code;
    @Getter
    private String value;

    SecurityEnum(int code,String value){
        this.code=code;
        this.value=value;
    }

    public static SecurityEnum getObj(int code){
        for (SecurityEnum value : values()) {
            if(value.getCode()==code){
                return value;
            }
        }
        return null;
    }
}
